package edu.sctu.wulixia.month6.day20150628;



import java.io.File;
import java.io.IOException;

/**
 * Created by user05 on 2015/6/28.
 */
public class SetUpFile {
    public void isAddFile(File file){

        if (!file.exists()){
            file.mkdir();
            System.out.println("文件夹创建成功");
        }

    }

    public String isAddDocument1(File file){

        String path = null;
        try {
            file.createNewFile();
            path = file.getAbsolutePath();

        } catch (IOException e) {
            e.printStackTrace();
        }

        return path;
    }

    public String isAddDocument2(File file){

        String path = null;
        try {
            file.createNewFile();
            path = file.getAbsolutePath();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return path;
    }
}
